package hxy.ecnu.model;
import lombok.Data;
/**
 * @author eric
 * @date 9/5/19 9:58 PM
 */
@Data
public class BaseException extends RuntimeException {
 
	private static final long serialVersionUID = -6339834911020358949L;
	// 错误信息
    private String message;
    private int code = 0;
    public BaseException(){
        super();
    }
    public BaseException(String message) {
        super(message);
        this.message = message;
    }

    public BaseException(int code , String message){
        super(message);
        this.code=code;

    }
    public BaseException(int code, Throwable throwable) {
        super(throwable);
        this.code = code;
    }
    @Override
    public String getMessage(){
        return message;
    }
    public int getCode(){
        return this.code;
    }
}

